Speculative Optimizations without Fear

ثبت نشده
چکیده

Just-in-time (JIT) language implementations make heavy use of speculative optimizations, based on assumptions that might become invalid. This requires the implementation to support a bailout mechanism to undo invalidated optimizations. The interaction between assumptions and optimizations is a major source of complexity for JIT implementers: how should optimizations preserve bailout information? What are the trade-offs when adding more assumptions? We demonstrate how to reason about correctness of speculative optimization and deoptimization. We present sourir, an intermediate representation with explicit assumption checkpoints, designed to formally study speculative optimizations in JIT systems. Sourir models core difficulties of speculative optimization, such as interleaving assumptions and optimizations, and the interaction with inlining. Our formalization stays at the IR level, thus abstracting away orthogonal aspects of JIT implementations, such as dynamic code generation and self mutation. We describe a set of common optimizations (constant folding, unreachable code elimination, and function inlining) and prove them correct in presence of speculative assumptions. CCS Concepts: • Software and its engineering→ Just-in-time compilers;

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

The Hot Path SSA Form: Extending the Static Single Assignment Form for Speculative Optimizations

The Static Single Assignment (SSA) form has been an eminent contribution towards analyzing programs for compiler optimizations. It has been a able to the design of simpler algorithms for existing optimizations, and has facilitated the development of new ones. However, speculative optimizations optimizations targeted towards speeding-up the common cases of a program have not been fortunate enoug...

متن کامل

A General Compiler Framework for Data Speculation Using DSCM

Getting precise alias information in a language that allows pointers, such as C, is expensive. One reason is that alias analysis should generate conservative (safe) alias information. Alias analysis assumes possible aliases when it can’t prove there are no aliases. The conservative alias information may greatly affect compiler optimizations. In this paper, we present a general framework to allo...

متن کامل

Making Lambda Calculus Smaller, Faster

Some optimizations are speculative: they improve execution speed most but not all of the time, or they trade o faster execution for an increase in code size. Other optimizations, such as dead-variable elimination and algebraic simpli cation, are guaranteed to both reduce code size and speed execution. It makes sense to group all of these \contracting" optimizations together in a single phase of...

متن کامل

Translation and Run - Time Validation of Optimized Code 1 , 2

The paper presents approaches to the validation of optimizing compilers. The emphasis is on aggressive and architecture-targeted optimizations which try to obtain the highest performance from modern architectures, in particular EPIC-like microprocessors. Rather than verify the compiler, the approach of translation validation performs a validation check after every run of the compiler, producing...

متن کامل

The Potential of Synergistic Static, Dynamic and Speculative Loop Nest Optimizations for Automatic Parallelization

Research in automatic parallelization of loop-centric programs started with static analysis, then broadened its arsenal to include dynamic inspection-execution and speculative execution, the best results involving hybrid static-dynamic schemes. Beyond the detection of parallelism in a sequential program, scalable parallelization on many-core processors involves hard and interesting parallelism ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2017